//
//  WeiboService.m
//  WeicoShow
//
//  Created by shawn on 16/1/17.
//  Copyright © 2016年 shawn. All rights reserved.
//

#import "WeiboService.h"
#import "Common.h"

@implementation WeiboService
/**
 判断是否有可用的Token
 */
+(BOOL)isAuthorized
{
    NSString *accessToken = [[NSUserDefaults standardUserDefaults] objectForKey:kSinaAccessTokenKey];
    NSDate *expiresDate = [[NSUserDefaults standardUserDefaults] objectForKey:kSinaTokenExpiresInKey];
    if (expiresDate) {
        return (NSOrderedDescending == [expiresDate compare:[NSDate date]] && accessToken);
    }
    return NO;
}
@end
